<?php 
	//odkaz veduci na listing userov (akcia admin_list)
	//'admin' => true znamena, ze v url sa pouzije prefix "admin" a zavila sa akcia s tymto preffixom, cize "admin" + "list" = "admin_list"
	// http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::link
	echo $this->Html->link('Back', array('admin' => true, 'controller' => 'users', 'action' => 'list'));
?>

<h1>Pridať užívateľa</h1>

<div id="detail">
<?php
	// http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html
	// http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html#adding-posts
	echo $this->Form->create('User', array('action' => 'add'));
	echo $this->Form->input('username', array('label' => 'Username'));
	echo $this->Form->input('password', array('label' => 'Password'));
	echo $this->Form->input('userlevel', array('label' => 'Userlevel', 'options' => array(USER_LEVEL_ADMIN => 'Admin', USER_LEVEL_SUPERADMIN => 'Superadmin')));
	echo '<br />'.$this->Form->button('Uložiť', array('type' => 'submit', 'class' => 'bold rounded bordered gradient'));
	echo $this->Form->end();
?>
</div>